/* -------------------------------------------------------------------------
 *  This file is part of the Cantian project.
 * Copyright (c) 2023 Huawei Technologies Co.,Ltd.
 *
 * Cantian is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *
 *          http://license.coscl.org.cn/MulanPSL2
 *
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 * -------------------------------------------------------------------------
 *
 * srv_param_def.h
 *
 *
 * IDENTIFICATION
 * src/server/params/srv_param_def.h
 *
 * -------------------------------------------------------------------------
 */
#ifndef __SRV_PARAM_DEF_H__
#define __SRV_PARAM_DEF_H__

#ifdef __cplusplus
extern "C" {
#endif
#define RM_SESSION_RATIO 1.2

typedef enum en_param_global {
    PARAM_LSNR_ADDR,
    PARAM_LSNR_PORT,
    PARAM_WORKER_THREADS,
    PARAM_OPTIMIZED_WORKER_THREADS,
    PARAM_MAX_WORKER_THREADS,
    PARAM_REACTOR_THREADS,
    PARAM_SQL_COMPAT,
    PARAM_DATA_BUFFER_SIZE,
    PARAM_VMA_SIZE,
    PARAM_LARGE_VMA_SIZE,
    PARAM__VMP_CACHES_EACH_SESS,
    PARAM_VMA_MEM_CHECK,
    PARAM_PMA_SIZE,
    PARAM_HASH_AREA_SIZE,
    PARAM_SHARED_POOL_SIZE,
    PARAM_SQL_POOL_FACTOR,
    PARAM_LARGE_POOL_SIZE,
    PARAM_LOG_BUFFER_SIZE,
    PARAM_LOG_BUFFER_COUNT,
    PARAM_TEMP_BUFFER_SIZE,
    PARAM_USE_LARGE_PAGES,
    PARAM_USE_NATIVE_DATATYPE,
    PARAM_JOB_QUEUE_PROCESSES,
    PARAM_CR_POOL_SIZE,
    PARAM_CR_POOL_COUNT,
    PARAM_DEFAULT_SPACE_TYPE,
    PARAM_BUFFER_PAGE_CLEAN_PERIOD,
    PARAM_BUFFER_LRU_SEARCH_THRE,
    PARAM_BUFFER_PAGE_CLEAN_RATIO,
    PARAM_BUFFER_PAGE_CLEAN_WAIT_TIMEOUT,
    PARAM_CKPT_WAIT_TIMEOUT,
    PARAM__SPIN_COUNT,
    PARAM__ENABLE_QOS,
    PARAM__QOS_CTRL_FACTOR,
    PARAM__QOS_SLEEP_TIME,
    PARAM__QOS_RANDOM_RANGE,
    PARAM__INDEX_BUFFER_SIZE,
    PARAM__INDEX_AUTO_REBUILD,
    PARAM__INDEX_AUTO_REBUILD_START_TIME,
    PARAM__AUTO_INDEX_RECYCLE,
    PARAM__INDEX_RECYCLE_PERCENT,
    PARAM__INDEX_RECYCLE_SIZE,
    PARAM__FORCE_INDEX_RECYCLE,
    PARAM__INDEX_RECYCLE_REUSE,
    PARAM__INDEX_REBUILD_KEEP_STORAGE,
    PARAM__DOUBLEWRITE,
    PARAM__THREAD_STACK_SIZE,
    PARAM__BLACK_BOX_DEPTH,
    PARAM__FORCE_HINT,
    PARAM__RCY_CHECK_PCN,
    PARAM__SGA_CORE_DUMP_CONFIG,
    PARAM__MAX_RM_COUNT,
    PARAM__SMALL_TABLE_SAMPLING_THRESHOLD,
    PARAM__ASHRINK_WAIT_TIME,
    PARAM__SHRINK_WAIT_RECYCLED_PAGES,
    PARAM__TEMPTABLE_SUPPORT_BATCH_INSERT,
    PARAM__AGENT_STACK_SIZE,
    PARAM__LOB_MAX_EXEC_SIZE,
    PARAM__VARIANT_AREA_SIZE,
    PARAM__INIT_CURSORS,
    PARAM__DISABLE_SOFT_PARSE,
    PARAM_SESSIONS,
    PARAM_KNL_AUTONOMOUS_SESSIONS,
    PARAM_AUTONOMOUS_SESSIONS,
    PARAM_SUPER_USER_RESERVED_SESSIONS,
    PARAM_NORMAL_USER_RESERVED_SESSION_FACTOR,
    PARAM_OPEN_CURSORS,
    PARAM_PREFETCH_ROWS,
    PARAM_PAGE_SIZE,
    PARAM_COMMIT_LOGGING,
    PARAM_COMMIT_WAIT,
    PARAM_CONTROL_FILES,
    PARAM_KMC_KEY_FILES,
    PARAM_DB_BLOCK_CHECKSUM,
    PARAM_DB_ISOLEVEL,
    PARAM__SERIALIZED_COMMIT,
    PARAM_LOG_ARCHIVE_CONFIG,
    PARAM_LOG_ARCHIVE_DEST_1,
    PARAM_LOG_ARCHIVE_DEST_2,
    PARAM_LOG_ARCHIVE_DEST_3,
    PARAM_LOG_ARCHIVE_DEST_4,
    PARAM_LOG_ARCHIVE_DEST_5,
    PARAM_LOG_ARCHIVE_DEST_6,
    PARAM_LOG_ARCHIVE_DEST_7,
    PARAM_LOG_ARCHIVE_DEST_8,
    PARAM_LOG_ARCHIVE_DEST_9,
    PARAM_LOG_ARCHIVE_DEST_10,
    PARAM_LOG_ARCHIVE_DEST_STATE_1,
    PARAM_LOG_ARCHIVE_DEST_STATE_2,
    PARAM_LOG_ARCHIVE_DEST_STATE_3,
    PARAM_LOG_ARCHIVE_DEST_STATE_4,
    PARAM_LOG_ARCHIVE_DEST_STATE_5,
    PARAM_LOG_ARCHIVE_DEST_STATE_6,
    PARAM_LOG_ARCHIVE_DEST_STATE_7,
    PARAM_LOG_ARCHIVE_DEST_STATE_8,
    PARAM_LOG_ARCHIVE_DEST_STATE_9,
    PARAM_LOG_ARCHIVE_DEST_STATE_10,
    PARAM_LOG_ARCHIVE_FORMAT,
    PARAM_LOG_ARCHIVE_FORMAT_WITH_LSN,
    PARAM_LOG_ARCHIVE_MAX_PROCESSES,
    PARAM_LOG_ARCHIVE_MIN_SUCCEED_DEST,
    PARAM_LOG_ARCHIVE_TRACE,
    PARAM_ENABLE_ARCH_COMPRESS,
    PARAM_QUORUM_ANY,
    PARAM_CHECKPOINT_TIMEOUT,
    PARAM_CHECKPOINT_INTERVAL,
    PARAM_CHECKPOINT_IO_CAPACITY,
    PARAM__CHECKPOINT_MERGE_IO,
    PARAM_LOG_REPLAY_PROCESSES,
    PARAM_REPLAY_PRELOAD_PROCESSES,
    PARAM__RCY_SLEEP_INTERVAL,
    PARAM_TIMED_STATISTICS,
    PARAM_STATISTICS_LEVEL,
    PARAM_DBWR_PROCESSES,
    PARAM_SQL_STAT,
    PARAM_INSTANCE_NAME,
    PARAM_ALARM_LOG_DIR,
    PARAM_REPL_ADDR,
    PARAM_REPL_PORT,
    PARAM_REPL_TRUST_HOST,
    PARAM_REPL_AUTH,
    PARAM_REPL_SCRAM_AUTH,
    PARAM__REPL_MAX_PKG_SIZE,
    PARAM_FILESYSTEMIO_OPTIONS,
    PARAM_BUILD_DATAFILE_PARALLEL,
    PARAM_ENABLE_TEMP_SPACE_BITMAP,
    PARAM_BUILD_DATAFILE_PREALLOCATE,
    PARAM_ENCRYPTION_ALG,
    PARAM_SYS_PASSWORD,
    PARAM_TC_LEVEL,
    PARAM_LOG_HOME,
    PARAM_LOG_BACKUP_FILE_COUNT,
    PARAM_LOG_MAX_FILE_SIZE,
    PARAM_LOG_LEVEL,
    PARAM_LOG_FILE_PERMISSIONS,
    PARAM_LOG_PATH_PERMISSIONS,
    PARAM_UNDO_RESERVE_SIZE,
    PARAM_UNDO_RETENTION_TIME,
    PARAM_INDEX_DEFER_RECYCLE_TIME,
    PARAM_UNDO_SEGMENTS,
    PARAM_ACTIVE_UNDO_SEGMENTS,
    PARAM_UNDO_AUTON_TRANS_SEGMENTS,
    PARAM_UNDO_AUTON_BIND_OWN_SEGMENT,
    PARAM_UNDO_AUTO_SHRINK,
    PARAM_UNDO_AUTO_SHRINK_INACTIVE,
    PARAM_UNDO_PREFETCH_PAGE_NUM,
    PARAM_TX_ROLLBACK_PROC,
    PARAM_REPL_WAIT_TIMEOUT,
    PARAM_COMMIT_ON_DISCONN,
    PARAM_MAX_CONNECT_BY_LEVEL,

    /* ADD HERE */
    PARAM_BACKUP_BUFFER_SIZE,
    PARAM_RESTORE_ARCH_COMPRESSED,
    PARAM_INDEX_SCAN_RANGE_CACHE,
    PARAM_RESTORE_CHECK_VERSION,
    PARAM_NBU_BACKUP_TIMEOUT,
    PARAM_CHECK_SYSDATA_VERSION,
    PARAM_MAX_ARCHIVE_FILES_SIZE,
    PARAM_ARCH_LOG_CHECK,
    PARAM_ARCHIVE_FILE_SIZE,
    PARAM_ARCHIVE_SIZE,
    PARAM_ARCHIVE_TIME,
    PARAM_ARCH_CLEAN_UPPER_LIMIT,
    PARAM_ARCH_CLEAN_LOWER_LIMIT,
    PARAM_ARCH_CLEAN_IGNORE_BACKUP,
    PARAM_ARCH_CLEAN_IGNORE_STANDBY,
    PARAM_XA_SUSPEND_TIMEOUT,
    PARAM_KEEP_ALIVE_TIMEOUT,
    PARAM_BACKUP_LOG_PARALLEL,
    PARAM_TCP_VALID_NODE_CHECKING,
    PARAM_TCP_INVITED_NODES,
    PARAM_TCP_EXCLUDED_NODES,
    PARAM_LOCK_WAIT_TIMEOUT,
    PARAM_LOCAL_KEY,
    PARAM_BUF_POOL_NUM,
    PARAM_DEFAULT_EXTENTS,
    PARAM_MAX_VM_FUNC_STACK_COUNT,
    PARAM_TEMP_POOL_NUM,
    PARAM_MERGE_SORT_BATCH_SIZE,
    PARAM_MAX_ALLOWED_PACKET,
    PARAM_DB_FILE_NAME_CONVERT,
    PARAM_LOG_FILE_NAME_CONVERT,
    PARAM_INTERACTIVE_TIMEOUT,
    PARAM_LONGSQL_TIMEOUT,
    PARAM_SSL_CA,
    PARAM_SSL_CERT,
    PARAM_SSL_KEY,
    PARAM_SSL_CRL,
    PARAM_SSL_VERIFY_PEER,
    PARAM_SSL_KEY_PASSWORD,
    PARAM_SSL_CIPHER,
    PARAM_SSL_EXPIRE_ALERT_THRESHOLD,
    PARAM_SSL_PERIOD_DETECTION,
    PARAM_LOCAL_TEMPORARY_TABLE_ENABLED,
    PARAM_UPPER_CASE_TABLE_NAMES,
    PARAM_UNAUTH_SESSION_EXPIRE_TIME,
    PARAM_ENABLE_SYSDBA_LOGIN,
    PARAM_ENABLE_SYS_REMOTE_LOGIN,
    PARAM_ENABLE_SYSDBA_REMOTE_LOGIN,
    PARAM_RESOURCE_LIMIT,
    PARAM__FACTOR_KEY,
    PARAM_ENABLE_ERR_SUPERPOSED,
    PARAM_EMPTY_STRING_AS_NULL,
    PARAM_ZERO_DIVISOR_ACCEPTED,
    PARAM_STRING_AS_HEX_BINARY,
    PARAM_DROP_NOLOGGING,
    PARAM_RECYCLEBIN,
    PARAM_HAVE_SSL,
    PARAM_ENCRYPTION_ITER,
    PARAM_MAX_TEMP_TABLES,
    PARAM_ENABLE_IDX_CONFS_NAME_DUPL,
    PARAM_ENABLE_IDX_KEY_LEN_CHECK,
    PARAM_CBO,
    PARAM_MAX_COLUMN_COUNT,
    PARAM_SAMPLE_SIZE,
    PARAM__SQL_CURSORS_EACH_SESSION,
    PARAM__RESERVED_SQL_CURSORS,
    PARAM_COVERAGE_ENABLE,
    PARAM_TYPE_MAP_FILE,
    PARAM_INI_TRANS,
    PARAM_CR_MODE,
    PARAM_ROW_FORMAT,
    PARAM__LSND_WAIT_TIME,
    PARAM_PRIVATE_KEY_LOCKS,
    PARAM_PRIVATE_ROW_LOCKS,
    PARAM_DDL_LOCK_TIMEOUT,
    PARAM_MAX_REMOTE_PARAMS,
    PARAM_DB_TIMEZONE,
    PARAM_TABLESPACE_ALARM_THRESHOLD,
    PARAM_UNDO_ALARM_THRESHOLD,
    PARAM_TXN_UNDO_ALARM_THRESHOLD,
    PARAM_SYSTIME_INCREASE_THREASHOLD,
    PARAM_BLOCK_REPAIR_ENABLE,
    PARAM_BLOCK_REPAIR_TIMEOUT,
    PARAM_UDS_FILE_PATH,
    PARAM_UDS_FILE_PERMISSIONS,
    PARAM_STATS_COST_LIMIT,
    PARAM_STATS_COST_DELAY,
    PARAM_ENABLE_SAMPLE_LIMIT,
    PARAM_MASTER_SLAVE_DIFFTIME,
    PARAM_WORKER_THREADS_SHRINK_THRESHOLD,
    PARAM_XA_FORMAT_ID,
    PARAM_DEGRADE_SEARCH_MAP,
    PARAM_SHARD_SERIAL_EXECUTION,
    PARAM_SHARD_CHECK_UNIQUE,
    PARAM_STATS_MAX_BUCKET_SIZE,
    PARAM_PARALLEL_POLICY,
    PARAM_DELAY_CLEANOUT,
    PARAM_REFUSESQL_LEVEL,
    PARAM_SHARD_REFUSETRANS_LEVEL,
    PARAM_SHARD_RETRY_TIMES,
    PARAM_SHARD_RETRY_INTERVAL,
    PARAM__SHARD_RESTRICTED_FEATURE,
    PARAM_ENABLE_ACCESS_DC,
    PARAM_VIEW_ACCESS_DC,
    /* GBP */
    PARAM_USE_GBP,
    PARAM_GBP_ADDR,
    PARAM_GBP_PORT,
    PARAM_LOCAL_GBP_HOST,
    PARAM_GBP_TRANS_TYPE,
    PARAM_GBP_FOR_RECOVERY,

    PARAM_SHARD_FORCE_ROLLBACK_WHEN_ERROR,
    PARAM_ENABLE_PERMISSIVE_UNICODE,
    PARAM_NODE_LOCK_STATUS,
    PARAM_UNDO_TABLESPACE,
    PARAM_LOB_REUSE_THRESHOLD,
    PARAM_ENABLE_LOCAL_INFILE,

    PARAM_SHARD_CONNECT_TIMEOUT,
    PARAM_SHARD_SOCKET_TIMEOUT,
    PARAM_SHARD_HEARTBEAT_TIMEOUT,
    PARAM_SHARD_PTRANS_CLEAN_TIMEOUT,
    PARAM_SHARD_ENABLE_READ_SYNC_SLAVE,
    PARAM_SHARD_MAX_REPLAY_LAG,
    PARAM_EXT_PROC_POOL_SIZE,
    PARAM_EXT_PROC_WORK_THREAD_NUM,
    PARAM_EXT_PROC_CHANNEL_NUM,
    PARAM_EXT_PROC_STARTUP,

    PARAM_SHOW_EXPLAIN_PREDICATE,
    PARAM_PLAN_DISPLAY_FORMAT,
    PRARM_SHARD_SCN_INTERVAL_THREASHOLD,
    PARAM_SHARD_CHECK_DB_ROLE,

    PARAM_SHARD_PRIV_CONNECTION_NUM,
    PARAM_SHARD_PRIV_SESSION_NUM,
    PARAM_SHARD_PRIV_AGENT_NUM,
    PARAM_DISABLE_VAR_PEEK,
    PARAM_ENABLE_CURSOR_SHARING,
    PARAM_ENABLE_USE_SPM,
    PARAM_ARRAY_STORAGE_OPTIMIZATION,
    PARAM_MAX_JSON_DYNAMIC_BUFFER_SIZE,
    PARAM_LONGSQL_STATS_PRINT,
    PRARM__DN_GROUPS_BEFORE_EXPAND,
    PARAM_STATS_PARALL_THREADS,
    PARAM_STATS_ENABLE_PARALL,
    PARAM_OUTER_JOIN_OPTIMIZATION,
    PARAM_CBO_INDEX_CACHING,
    PARAM_CBO_INDEX_COST_ADJ,
    PARAM_CBO_PATH_CACHING,
    PARAM__WITHAS_SUBQUERY,
    PARAM_PBL_FILE_SIZE,
    PARAM_DISTINCT_PRUNING,
    PARAM_QUERY_TOPN_THRESHOLD,
    PARAM_OPTIM_CONNECT_BY_MTRL,
    PARAM_INIT_LOCKPOOL_PAGES,
    PARAM_OPTIM_AGGR_PLACEMENT,
    PARAM_OPTIM_OR_EXPANSION,
    PARAM_OPTIM_DISTINCT_ELIMINATION,
    PARAM_OPTIM_PROJECT_LIST_PRUNING,
    PARAM_OPTIM_PRED_MOVE_AROUND,
    PARAM_OPTIM_HASH_MTRL,
    PARAM_OPTIM_WINMAGIC_REWRITE,
    PARAM_OPTIM_PRED_REORDER,
    PARAM_OPTIM_ORDER_BY_PLACEMENT,
    PARAM_OPTIM_SUBQUERY_ELIMINATION,
    PARAM_OPTIM_JOIN_ELIMINATION,
    PARAM_OPTIM_CONNECT_BY_PLACEMENT,
    PARAM_OPTIM_GROUP_BY_ELIMINATION,
    PARAM_OPTIM_ANY_TRANSFORM,
    PARAM_OPTIM_ALL_TRANSFORM,
    PARAM_ENABLE_MULTI_INDEX_SCAN,
    PARAM_OPTIM_JOIN_PRED_PUSHDOWN,
    PARAM_OPTIM_FILTER_PUSHDOWN,
    PARAM_OPTIM_INDEX_SCAN_MAX_PARTS,
    PARAM_OPTIM_ORDER_BY_ELIMINATION,
    PARAM_OPTIM_UNNEST_SET_SUBQ,
    PARAM_OPTIM_ENABLE_RIGHT_SEMIJOIN,
    PARAM_OPTIM_ENABLE_RIGHT_ANTIJOIN,
    PARAM_OPTIM_ENABLE_RIGHT_LEFTJOIN,
    PARAM_SEGMENT_PAGES_HOLD,
    PARAM_HASH_PAGES_HOLD,
    PARAM_OPTIM_SIMPLIFY_EXISTS_SUBQ,
    PARAM_CTRLLOG_BACKUP_LEVEL,
    PARAM_ENABLE_FUNC_INDEX_SCAN_ONLY,
    PARAM_ENABLE_INDEX_COND_PRUNING,
    PARAM_OPTIM_VM_VIEW_ENABLED,
    PARAM_ENABLE_NL_FULL_OPTIMIZATION,
    PARAM_TABLE_COMPRESS_ALGO,
    PARAM_TABLE_COMPRESS_BUF_SIZE,
    PARAM_TABLE_COMPRESS_ENABLE_BUF,
    PARAM_ENABLE_PASSWORD_CIPHER,
    PARAM_ENABLE_CBO_HINT,
    PARAM_PARALLEL_MAX_THREADS,
    PARAM_CBO_DYNAMIC_SAMPLING,
    PARAM_STRICT_CASE_DATATYPE,
    PARAM_MAX_LINK_TABLES,
    PARAM_AUTO_INHERIT,
    PARAM_REPLACE_PASSWORD_VERIFY,

    PARAM_CLUSTER_DATABASE,
    PARAM_INTERCONNECT_ADDR,
    PARAM_INTERCONNECT_PORT,
    PARAM_INTERCONNECT_TYPE,
    PARAM_INTERCONNECT_CHANNEL_NUM,
    PARAM_REACTOR_THREAD_NUM,
    PARAM_TX_FREE_PAGE_LIST,
    PARAM_DAAC_TASK_NUM,
    PARAM_INSTANCE_ID,
    PARAM_MES_POOL_SIZE,
    PARAM_GSS_INST_PATH,
    PARAM_INTERCONNECT_BY_PROFILE,
    PARAM_MES_ELAPSED_SWITCH,
    PARAM_MES_CRC_CHECK_SWITCH,
    PARAM_GSS_MAX_OPEN_FILES,
    PARAM_ENABLE_RMO_CR,
    PARAM_REMOTE_ACCESS_LIMIT,
    PARAM_GDV_SQL_SESS_TMOUT, // for gdv
    PARAM_DTC_CKPT_NOTIFY_TASK_RATIO,
    PARAM_DTC_CLEAN_EDP_TASK_RATIO,
    PARAM_DTC_TXN_INFO_TASK_RATIO,
    // SHM MQ
    PARAM_SHM_MQ_MSG_RECV_THD_NUM,
    PARAM_SHM_MQ_MSG_QUEUE_NUM,
    PARAM_SHM_MQ_MSG_THD_COOL_TIME_US,
    // cpu info
    PARAM_SHM_CPU_GROUP_INFO,
    PARAM_SHM_MYSQL_CPU_GROUP_INFO,
    // Cantian connector
    PARAM_CTC_MAX_INST_PER_NODE,
    // deadlock
    PARAM_DEADLOCK_DETECT_INTERVAL,

    PARAM_AUTO_UNDO_RETENTION,
    PARAM_SHARED_PATH,
    // PARAM_MEM_POOL_INIT_SIZE,
    // PARAM_MEM_POOL_MAX_SIZE,
    /* ADD HERE */
    // dbstor
    PARAM_ENABLE_DBSTORE,
    PARAM_DBSTORE_NAMESPACE,
    PARAM_COMPATIBLE_MYSQL,
    PARAM_ENABLE_IO_RECORD,
    PARAM_PAGE_CLEAN_MODE,
    PARAM_ENABLE_DBSTOR_BATCH_FLUSH,
    PARAM_CLUSTER_ID,
    PARAM_BACKUP_RETRY,
    PARAM_BATCH_FLUSH_CAPACITY,
    PARAM_ENABLE_HWN_CHANGE,
    PARAM_MES_SSL_SWITCH,
    PARAM_MES_SSL_CRT_KEY_PATH,
    PARAM_MES_SSL_KEY_PWD,
    PARAM_CEIL,
} param_global_t;

#ifdef __cplusplus
}
#endif

#endif
